3.31 \(\int \frac {\cos (x)}{a+b \cos ^2(x)} \, dx\)

Optimal. Leaf size=29 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{\sqrt {b} \sqrt {a+b}} \]

[Out]

arctanh(sin(x)*b^(1/2)/(a+b)^(1/2))/b^(1/2)/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3186, 208} \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{\sqrt {b} \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]/(a + b*Cos[x]^2),x]

[Out]

ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]]/(Sqrt[b]*Sqrt[a + b])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3186

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\cos (x)}{a+b \cos ^2(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\sin (x)\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{\sqrt {b} \sqrt {a+b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 29, normalized size = 1.00 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{\sqrt {b} \sqrt {a+b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/(a + b*Cos[x]^2),x]

[Out]

ArcTanh[(Sqrt[b]*Sin[x])/Sqrt[a + b]]/(Sqrt[b]*Sqrt[a + b])

________________________________________________________________________________________

fricas [B]  time = 0.56, size = 95, normalized size = 3.28 \[ \left [\frac {\log \left (-\frac {b \cos \relax (x)^{2} - 2 \, \sqrt {a b + b^{2}} \sin \relax (x) - a - 2 \, b}{b \cos \relax (x)^{2} + a}\right )}{2 \, \sqrt {a b + b^{2}}}, -\frac {\sqrt {-a b - b^{2}} \arctan \left (\frac {\sqrt {-a b - b^{2}} \sin \relax (x)}{a + b}\right )}{a b + b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[1/2*log(-(b*cos(x)^2 - 2*sqrt(a*b + b^2)*sin(x) - a - 2*b)/(b*cos(x)^2 + a))/sqrt(a*b + b^2), -sqrt(-a*b - b^
2)*arctan(sqrt(-a*b - b^2)*sin(x)/(a + b))/(a*b + b^2)]

________________________________________________________________________________________

giac [A]  time = 0.18, size = 31, normalized size = 1.07 \[ -\frac {\arctan \left (\frac {b \sin \relax (x)}{\sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

-arctan(b*sin(x)/sqrt(-a*b - b^2))/sqrt(-a*b - b^2)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 21, normalized size = 0.72 \[ \frac {\arctanh \left (\frac {\sin \relax (x ) b}{\sqrt {\left (a +b \right ) b}}\right )}{\sqrt {\left (a +b \right ) b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a+b*cos(x)^2),x)

[Out]

1/((a+b)*b)^(1/2)*arctanh(sin(x)*b/((a+b)*b)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.85, size = 39, normalized size = 1.34 \[ -\frac {\log \left (\frac {b \sin \relax (x) - \sqrt {{\left (a + b\right )} b}}{b \sin \relax (x) + \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

-1/2*log((b*sin(x) - sqrt((a + b)*b))/(b*sin(x) + sqrt((a + b)*b)))/sqrt((a + b)*b)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 21, normalized size = 0.72 \[ \frac {\mathrm {atanh}\left (\frac {\sqrt {b}\,\sin \relax (x)}{\sqrt {a+b}}\right )}{\sqrt {b}\,\sqrt {a+b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/(a + b*cos(x)^2),x)

[Out]

atanh((b^(1/2)*sin(x))/(a + b)^(1/2))/(b^(1/2)*(a + b)^(1/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/(a+b*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________